<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('转移给某人')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-data-transto" name="form-data-transtoo">
        <div class="form-group">
            <label class="col-sm-3 control-label">原人员：</label>
            <div class="col-sm-8">
                <h1 th:text="${msg}"></h1>
                <input id="toolbarss" th:value="${id}" hidden>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">新人员：</label>
            <div class="col-sm-8">
                <div class="input-group date">
                    <select name="liveForeighn" id="liveForeighn" >
                        <option value="">请选择</option>
                        <option th:each="c,stat:${user}" th:text="${c.value}" th:value="${c.key}"></option>
                    </select>

                </div>

            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label"></label>
            <div class="col-sm-8">
                <div class="btn-group-sm" id="toolbar" role="group">
                    <a class="btn btn-success" onclick="submitok()">
                        <i class="fa fa-plus"></i> 确定
                    </a>
                    <a class="btn btn-primary single" onclick="closeTab()">
                        <i class="fa fa-edit"></i> 取消
                    </a>

                    </a>

                </div>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
    var prefix = ctx + "system/pend"

    function closeTab() {

        $.modal.closeTab()
    }

    function submitok() {
        var t = $('#liveForeighn').val();
        var f = $('#toolbarss').val();

        if (t==''){
            $.modal.msgWarning("未选择新运营人员");

        }else {
            var data = {
                id: t,
                uId: f
            }
            $.operate.submit(prefix + "/transto", "post", "json", data)
            window.parent.location.reload();
            $.modal.closeTab()
        }
    }
</script>
</body>
</html>
